package com.jvyou.mybatis.demo.factory;

import com.jvyou.mybatis.datasource.JvyouDataSourceFactory;
import com.zaxxer.hikari.HikariConfig;
import com.zaxxer.hikari.HikariDataSource;

import javax.sql.DataSource;
import java.util.Properties;

/**
 * @author 橘柚
 * @version 1.0-SNAPSHOT
 * @Date 2024/7/22 16:01
 * @Description
 */
public class HikariCPDataSourceFactory implements JvyouDataSourceFactory {
    @Override
    public DataSource getDataSource(Properties properties) {
        HikariConfig config = new HikariConfig(properties);
        return new HikariDataSource(config);
    }
}
